package club.koorilkaze;

import club.koorilkaze.factory.DAOFactory;
import club.koorilkaze.vo.User;

import java.sql.SQLException;
import java.util.ArrayList;

/**
 * @deprecated : 主类用于测试
 */
public class App {
    /**
     * Main.
     *
     * @param args the args
     */
    public static void main( String[] args ){
        try {
            ArrayList<User> list = DAOFactory.getIUserDaoInstance().selectAll();
//            for (int i = 0; i < list.size(); i++) {
//                user = list.get(i);
//                System.out.print(user.getUserid() + "   ");
//                System.out.print(user.getName() + "   ");
//                System.out.println(user.getPassword());
//            }
            for ( User user : list ) {
                System.out.print(user.getUserid() + "   ");
                System.out.print(user.getName() + "   ");
                System.out.println(user.getPassword());
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }

    }
}
